﻿using GadgetStore.Data.Models;
using GadgetStore.Web.Adapters;
using GadgetStore.Web.Adapters.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace GadgetStore.Web.Controllers
{
    public class ApiAllViewController : ApiController
    {
        private IAllView _adapter;
        public ApiAllViewController()
        {
            _adapter = new AllViewAdapter();
        }
        public IHttpActionResult GET(int pageNum)
        {
            List<Gadget> Gadgets = _adapter.GetPagedGadgets(pageNum);
            return Ok(pageNum);
        }
    }
}
